package qq2564874169.tuaotuao.fx.app;


import jakarta.servlet.ServletRequestEvent;
import jakarta.servlet.ServletRequestListener;

public class FxRequestListener implements ServletRequestListener {
    private FxSpringApp app;

    public FxRequestListener(FxSpringApp app) {
        this.app = app;
    }

    @Override
    public void requestDestroyed(ServletRequestEvent sre) {
        RequestEventArgs args = RequestInterceptor.getArgs(sre.getServletRequest());
        if (args != null) {
            app.getMvcEvents().onReuqestAfter(app, args);
        }
    }
}
